package com.jswzc.common.api.model.Hmodel;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by liujiajia on 2017/6/6.
 */
@Entity
@Table(name = "demo_grid")
public class TDemoGrid {
    private String id;
    private String customer;
    private Double amounts;
    private Double freight;
    private Double total;
    private String remarks;
    private Timestamp createTime;
    private Short state;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "customer")
    public String getCustomer() {
        return customer;
    }

    public void setCustomer(String customer) {
        this.customer = customer;
    }

    @Basic
    @Column(name = "amounts")
    public Double getAmounts() {
        return amounts;
    }

    public void setAmounts(Double amounts) {
        this.amounts = amounts;
    }

    @Basic
    @Column(name = "freight")
    public Double getFreight() {
        return freight;
    }

    public void setFreight(Double freight) {
        this.freight = freight;
    }

    @Basic
    @Column(name = "total")
    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    @Basic
    @Column(name = "remarks")
    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Basic
    @Column(name = "createTime")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "state")
    public Short getState() {
        return state;
    }

    public void setState(Short state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TDemoGrid tDemoGrid = (TDemoGrid) o;

        if (id != null ? !id.equals(tDemoGrid.id) : tDemoGrid.id != null) return false;
        if (customer != null ? !customer.equals(tDemoGrid.customer) : tDemoGrid.customer != null) return false;
        if (amounts != null ? !amounts.equals(tDemoGrid.amounts) : tDemoGrid.amounts != null) return false;
        if (freight != null ? !freight.equals(tDemoGrid.freight) : tDemoGrid.freight != null) return false;
        if (total != null ? !total.equals(tDemoGrid.total) : tDemoGrid.total != null) return false;
        if (remarks != null ? !remarks.equals(tDemoGrid.remarks) : tDemoGrid.remarks != null) return false;
        if (createTime != null ? !createTime.equals(tDemoGrid.createTime) : tDemoGrid.createTime != null) return false;
        if (state != null ? !state.equals(tDemoGrid.state) : tDemoGrid.state != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (customer != null ? customer.hashCode() : 0);
        result = 31 * result + (amounts != null ? amounts.hashCode() : 0);
        result = 31 * result + (freight != null ? freight.hashCode() : 0);
        result = 31 * result + (total != null ? total.hashCode() : 0);
        result = 31 * result + (remarks != null ? remarks.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        return result;
    }
}
